package com.db4o.odbgen.plugins.java.maingenerator.typedxmlschema;



/**
 * 
 * An enumeration describing known collection types.
 * @author liviug
 */
public enum CollectionType {
    LIST("List", 0),
    SET("Set", 0),
    COLLECTION("Collection", 0),
    QUEUE("Queue", 0),
    DEQUE("Deque", 0),
    MAP("Map", 0);

    private String _simpleName;
    private int _sodaTypeArgumentOffset;

    CollectionType(String name, int sodaTypeArgumentOffset){
        this._simpleName = name;
        this._sodaTypeArgumentOffset = sodaTypeArgumentOffset;
    }
    
    public String getSimpleName() {
        return this._simpleName;
    }

    /**
     * Represents the offset of the type argument used by SODA queries.
     * For example List<User> will return 0, indicating that SODA queries will search
     * for values inside 'User' type when processing a 'List<User>' field.
     */
    public int getSodaTypeArgumentOffset(){
    	return this._sodaTypeArgumentOffset;
    }
}
